package com.example.wallet.bean

import com.alibaba.fastjson.annotation.JSONField
import com.example.wallet.utils.getManagementName
import com.example.wallet.utils.getMemberName
import java.io.Serializable

data class UserInfoTemple(

    //手机号
    var account: String = "",

    //用户实名验证状态（0--未提交，1--审核中 ，2--审核通过，3--审核未通过）
    var checkStatusIdcard: Int,

    //
    var checkStatusMail: Int,

    var checkStatusPhone: Int,

    //商城消费额
    var consumptionU: Int,

    //
    var createTime: String = "",

    //邮箱
    var email: String,

    //
    var groupPer: Int,

    //
    var invitationCode: String = "",

    //
    var invitedCode: String = "",

    //最后登录时间
    var lastLoginTime: String = "",

    //用户等级 0优惠体验会员；1体验会员；2初级会员；3中级会员；4高级会员；5初级代理；6中级代理；7高级代理
    var level: Int,

    //登录状态
    var loginStatus: Int,

    //市场等级 0无级别；1主任;2经理;3总监;4董事;5荣誉董事
    var managementLevel: Int,

    //市场业绩
    var marketPer: Int,

    //
    var nodeLevel: String = "",

    //推荐人账户
    var parAccount: String = "",

    //
    var passwd: String = "",

    var payPasswd: String = "",

    //邀请人id
    var puid: Int,

    //
    var sysWalletAddress: String = "",

    //树形id
    var treeUid: String = "",

    //树形长度
    var treeUidLength: Int,

    //用户id
    var uid: Int,

    //
    var userNumber: String = "",
) : Serializable {

//    //
//    @JSONField(name = "deviceToken",defaultValue = "")
//    var deviceToken: String=""

    fun getMemberTypeName() = getMemberName(this)

    fun managementName() = getManagementName(this)

//    override fun toString(): String {
//        return "UserInfoTemple(account='$account', checkStatusIdcard=$checkStatusIdcard, checkStatusMail=$checkStatusMail, checkStatusPhone=$checkStatusPhone, consumptionU=$consumptionU, createTime='$createTime', deviceToken='$deviceToken', email='$email', groupPer=$groupPer, invitationCode='$invitationCode', invitedCode='$invitedCode', lastLoginTime='$lastLoginTime', level=$level, loginStatus=$loginStatus, managementLevel=$managementLevel, marketPer=$marketPer, nodeLevel='$nodeLevel', parAccount='$parAccount', passwd='$passwd', payPasswd='$payPasswd', puid=$puid, sysWalletAddress='$sysWalletAddress', treeUid='$treeUid', treeUidLength=$treeUidLength, uid=$uid, userNumber='$userNumber')"
//    }


}